<template>
	<view class="productHezuoDetails">
		<view class="productHezuoDetails-head" :style="{'backgroundImage': 'url('+ msg.partsImages +')'}">
			<!-- <image class="productHezuoDetails-head-img" :src=msg.partsImages mode=""></image> -->
		</view>
		<view class="productHezuoDetails-main">
			<view class="productHezuoDetails-main-con">
				<view class="productHezuoDetails-main-con-top font_blod">
					{{msg.partsName}}
				</view>
				<view class="productHezuoDetails-main-con-btm">
					<view class="">
						<text class="productHezuoDetails-main-con-btm-txt1" v-if="msg.isPost == 1">包邮 偏远地区补差价</text>
						<text class="baoyou-no" v-else>不包邮</text>
					</view>
					<text class="productHezuoDetails-main-con-btm-txt2" @click="cli_go_information">完善信息</text>
				</view>
			</view>
			<view class="productHezuoDetails-remark">
				<view class="productHezuoDetails-remark-title">
					<view class="productHezuoDetails-remark-title-box font_blod">
						包装类型标准
					</view>
				</view>
				<view class="productHezuoDetails-remark-content" v-html="msg.partsAttention">
					
				</view>
			</view>
			<view class="productHezuoDetails-remark">
				<view class="productHezuoDetails-remark-title">
					<view class="productHezuoDetails-remark-title-box font_blod">
						质量标准说明
					</view>
				</view>
				<view class="productHezuoDetails-remark-content" v-html="msg.partsInstructions">
				</view>
			</view>
			<view class="productHezuoDetails-remark">
				<view class="productHezuoDetails-remark-title">
					<view class="productHezuoDetails-remark-title-box font_blod">
						质保方式说明
					</view>
				</view>
				<view class="productHezuoDetails-remark-content" v-html="msg.partsDamageDetails">
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import allapi from '../api/index.js'
	export default {
		data() {
			return {
				partsId: '',
				msg: {
					partsImages: '',
					partsName: '',
					partsAttention: '',
					partsInstructions: '',
					partsDamageDetails: '',
					
				}
			}
		},
		onLoad(val) {
			this.partsId = val.id
		},
		onShow() {
			this.getFactoryPartsDetails()
		},
		mounted() {
		},
		methods: {
			// 跳转完善信息
			cli_go_information () {
				let id = this.partsId
				uni.navigateTo({
					url: '/pages/manufacturers/productInformation/productInformation?id=' + id
				})
			},
			getFactoryPartsDetails () {
				uni.request({
					url: allapi.getFactoryPartsDetails,
					data: {
						partsId: this.partsId
					},
					success: (res) => {
						this.msg = res.data.data
					}
				})
			},
		}
	}
</script>

<style scoped>
	.productHezuoDetails {
		
	}
	.productHezuoDetails-head {
		width: 750rpx;
		height: 750rpx;
		background: #EEEEEE;
		background-size: 100%;
		background-repeat: no-repeat;
	}
	.productHezuoDetails-head-img {
		width: 750rpx;
		height: 750rpx;
	}
	.productHezuoDetails-main {
		min-height: 1000rpx;
		background-image: url('https://www.zzzsyh.com/applets/agent/factory/15.png');
		background-size: 100%;
		background-repeat: no-repeat;
		margin-top: -230rpx;
		padding-top: 0.1rpx;
		padding-bottom: 50rpx;
	}
	.productHezuoDetails-main-con {
		margin: 0 24rpx;
		height: 160rpx;
		background: linear-gradient(270deg, #AFF0EE 0%, #F8FDE9 100%);
		box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(45, 169, 145, 0.5);
		border-radius: 24rpx;
		margin-top: 120rpx;
		padding: 24rpx;
	}
	.productHezuoDetails-main-con-top {
		font-size: 32rpx;
		color: #09ABB2;
		line-height: 44rpx;
	}
	.productHezuoDetails-main-con-btm {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 16rpx;
	}
	.productHezuoDetails-main-con-btm-txt1 {
		font-size: 24rpx;
		font-weight: 400;
		color: #28CD50;
		line-height: 34rpx;
		padding: 0 12rpx;
		border-radius: 6rpx;
		border: 2rpx solid #28CD50;
	}
	.productHezuoDetails-main-con-btm-txt2 {
		width: 144rpx;
		height: 56rpx;
		line-height: 56rpx;
		text-align: center;
		border-radius: 28rpx;
		border: 2rpx solid #333333;
		font-size: 24rpx;
		font-weight: 400;
		color: #333333;
	}
	.productHezuoDetails-remark {
		margin: 24rpx;
		border-radius: 24rpx;
		background: #FFFFFF;
		padding-bottom: 48rpx;
	}
	.productHezuoDetails-remark-title {
		display: flex;
		justify-content: center;
	}
	.productHezuoDetails-remark-title-box {
		height: 64rpx;
		line-height: 64rpx;
		text-align: center;
		width: 280rpx;
		background: linear-gradient(90deg, #FAC895 0%, #F3AE73 100%);
		box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(244, 178, 121, 0.5);
		border-radius: 0rpx 0rpx 16rpx 16rpx;
		color: #FFFFFF;
		font-size: 32rpx;
	}
	.productHezuoDetails-remark-content {
		font-size: 24rpx;
		font-weight: 400;
		color: #666666;
		margin: 24rpx;
		word-break: break-all;
		white-space: pre-wrap;
	}
</style>
